amd iommu: Remove redundant checks from iommu emulation code path
authorWei Wang <wei.wang2@amd.com>
Thu, 9 Feb 2012 14:06:26 +0000 (06:06 -0800)
committerWei Wang <wei.wang2@amd.com>
Thu, 9 Feb 2012 14:06:26 +0000 (06:06 -0800)
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/drivers/passthrough/amd/iommu_guest.c

index 337d72b26838231af3e797c9e4768c8fdeb3e014..e2daf0e52e4599e528ef4f30d94370c4e55fed9f 100644 (file)
@@ -805,9 +805,6 @@ int guest_iommu_set_base(struct domain *d, uint64_t base)
     p2m_type_t t;
     struct guest_iommu *iommu = domain_iommu(d);
 
-    if ( !is_hvm_domain(d) || !iommu_enabled || !iommuv2_enabled )
-        return 0;
-
     if ( !iommu )
         return -EACCES;
 
@@ -896,9 +893,6 @@ void guest_iommu_destroy(struct domain *d)
 {
     struct guest_iommu *iommu;
 
-    if ( !is_hvm_domain(d) || !iommu_enabled || !iommuv2_enabled )
-        return;
-
     iommu = domain_iommu(d);
     if ( !iommu )
         return;